package com.eastfair.home.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.database.mybatis.typehandler.M9EncryptHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 报馆搭建商信息审核记录
 * </p>
 *
 * @author dq
 * @since 2022-08-08
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value="hc_report_builder_audit",autoResultMap = true)
@ApiModel(value = "ReportBuilderAudit", description = "报馆搭建商信息审核记录")
@AllArgsConstructor
public class ReportBuilderAudit extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 报馆审核ID
     */
    @ApiModelProperty(value = "报馆审核ID")
    @TableField(value = "report_space_audit_id")
    @Excel(name = "报馆审核ID")
    private Long reportSpaceAuditId;

    /**
     * 报馆ID
     */
    @ApiModelProperty(value = "报馆ID")
    @TableField(value = "report_space_id")
    @Excel(name = "报馆ID")
    private Long reportSpaceId;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Size(max = 1000, message = "备注长度不能超过1000")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "备注")
    private String remark;

    /**
     * 统一社会信用代码
     */
    @ApiModelProperty(value = "统一社会信用代码")
    @Size(max = 100, message = "统一社会信用代码长度不能超过100")
    @TableField(value = "uscc", condition = LIKE)
    @Excel(name = "统一社会信用代码")
    private String uscc;

    /**
     * 施工单位名称
     */
    @ApiModelProperty(value = "施工单位名称")
    @Size(max = 100, message = "施工单位名称长度不能超过100")
    @TableField(value = "construction_name", condition = LIKE)
    @Excel(name = "施工单位名称")
    private String constructionName;

    /**
     * 施工负责人
     */
    @ApiModelProperty(value = "施工负责人")
    @Size(max = 100, message = "施工负责人长度不能超过100")
    @TableField(value = "construction_principal", condition = LIKE)
    @Excel(name = "施工负责人")
    private String constructionPrincipal;

    /**
     * 施工负责人联系电话
     */
    @ApiModelProperty(value = "施工负责人联系电话")
    @Size(max = 50, message = "施工负责人联系电话长度不能超过50")
    @TableField(value = "principal_phone", condition = LIKE,typeHandler = M9EncryptHandler.class)
    @Excel(name = "施工负责人联系电话")
    private String principalPhone;

    /**
     * 值守电工姓名
     */
    @ApiModelProperty(value = "值守电工姓名")
    @Size(max = 100, message = "值守电工姓名长度不能超过100")
    @TableField(value = "electrician_name", condition = LIKE)
    @Excel(name = "值守电工姓名")
    private String electricianName;

    /**
     * 值守电工联系电话
     */
    @ApiModelProperty(value = "值守电工联系电话")
    @Size(max = 50, message = "值守电工联系电话长度不能超过50")
    @TableField(value = "electrician_phone", condition = LIKE,typeHandler = M9EncryptHandler.class)
    @Excel(name = "值守电工联系电话")
    private String electricianPhone;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    @Size(max = 50, message = "邮箱长度不能超过50")
    @TableField(value = "email", condition = LIKE)
    @Excel(name = "邮箱")
    private String email;

    /**
     * 传真
     */
    @ApiModelProperty(value = "传真")
    @Size(max = 50, message = "传真长度不能超过50")
    @TableField(value = "fax", condition = LIKE)
    @Excel(name = "传真")
    private String fax;

    /**
     * 保险信息
     */
    @ApiModelProperty(value = "保险信息")
    @Size(max = 1000, message = "保险信息长度不能超过1000")
    @TableField(value = "insurance", condition = LIKE)
    @Excel(name = "保险信息")
    private String insurance;


    @Builder
    public ReportBuilderAudit(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    Long reportSpaceAuditId, Long reportSpaceId, String remark, String uscc, String constructionName, String constructionPrincipal, 
                    String principalPhone, String electricianName, String electricianPhone, String email, String fax, String insurance) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.reportSpaceAuditId = reportSpaceAuditId;
        this.reportSpaceId = reportSpaceId;
        this.remark = remark;
        this.uscc = uscc;
        this.constructionName = constructionName;
        this.constructionPrincipal = constructionPrincipal;
        this.principalPhone = principalPhone;
        this.electricianName = electricianName;
        this.electricianPhone = electricianPhone;
        this.email = email;
        this.fax = fax;
        this.insurance = insurance;
    }

}
